﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>后台管理</title>
    <!-- bootstrap styles -->
    <link th:href="@{css/bootstrap.css}" th:rel="stylesheet" media="all" />
    <!-- font-awesome styles -->
    <link th:href="@{css/font-awesome.css}" th:rel="stylesheet" media="all"/>
    <!-- Admin Styles -->
    <link th:href="@{css/admin.css}" th:rel="stylesheet" media="all"/>
    <!-- google styles -->
    <link href="http://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" />
     <!-- TABLE STYLES -->
    <link th:href="@{css/dataTables.bootstrap.css}" th:rel="stylesheet" media="all"/>

    <!-- JS Scripts-->
    <script th:src="@{js/jquery.min.js}"></script>
    <script th:src="@{js/bootstrap-3.1.1.min.js}"></script>
    <!-- Metis Menu Js -->
    <script th:src="@{js/jquery.metisMenu.js}"></script>
    <!-- DATA TABLE SCRIPTS -->
    <script th:src="@{js/jquery.dataTables.js}"></script>
    <script th:src="@{js/dataTables.bootstrap.js}"></script>
    <script th:inline="javascript">
        $(document).ready(function () {
            $('#dataTables-example').dataTable();
        });
    </script>
    <!-- Admin Js -->
    <script th:src="@{js/admin.js}"></script>
</head>
<body>
    <div id="wrapper">
        <nav class="navbar navbar-default top-navbar" role="navigation">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" th:href="admin"><strong>JGrowth</strong></a>
            </div>

            <ul class="nav navbar-top-links navbar-right">
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
                        <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li><a th:href="get_articles_username"><i class="fa fa-files-o fa-fw"></i> 我的文章</a></li>
                        <li><a th:href="@{editor}"><i class="fa fa-edit fa-fw"></i> 发布文章</a></li>
                        <li class="divider"></li>
                        <li><a th:href="do_loginOut"><i class="fa fa-sign-out fa-fw"></i> 注销</a></li>
                    </ul>
                    <!-- /.dropdown-user -->
                </li>
                <!-- /.dropdown -->
            </ul>
        </nav>
        <!--/. NAV TOP  -->
        <nav class="navbar-default navbar-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav" id="main-menu">
                    <li>
                        <a th:href="admin" class="active-menu"><i class="fa fa-users"></i>用户管理</a>
                    </li>
                </ul>

            </div>

        </nav>
        <!-- /. NAV SIDE  -->
        <div id="page-wrapper" >
		    <div class="header">
                <ol class="breadcrumb">
                    <li><a th:href="admin">后台管理</a></li>
                    <li><a th:href="admin">用户管理</a></li>
                </ol>

		    </div>
		
            <div id="page-inner"> 
               
                <div class="row">
                    <div class="col-md-12">
                        <!-- Advanced Tables -->
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                 用户记录
                            </div>
                            <div class="panel-body">
                                <div class="table-responsive">
                                    <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                        <thead>
                                            <tr>
                                                <th>#</th>
                                                <th>用户名</th>
                                                <th>性别</th>
                                                <th>生日</th>
                                                <th>Email</th>
                                                <th>QQ</th>
                                                <th>微信</th>
                                                <th>电话</th>
                                                <th>注册时间</th>
                                                <th>上次登录</th>
                                                <th>用户角色</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr th:each="user:${session.users}" class="odd gradeX">
                                                <td th:text="${user.uid}"></td>
                                                <td th:text="${user.name}"></td>
                                                <td th:text="${user.gender}"></td>
                                                <td th:text="${#dates.format(user.birthday,'yyyy-MM-dd- HH:mm:ss')}"></td>
                                                <td th:text="${user.email}"></td>
                                                <td th:text="${user.qq}"></td>
                                                <td th:text="${user.phone}"></td>
                                                <td th:text="${user.wechat}"></td>
                                                <td th:text="${#dates.format(user.registerTime,'yyyy-MM-dd- HH:mm:ss')}"></td>
                                                <td th:text="${#dates.format(user.latestOnlineTime,'yyyy-MM-dd- HH:mm:ss')}"></td>
                                                <td th:text="${user.rid}"></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                             </div>
                        </div>
                        <!--End Advanced Tables -->
                     </div>
                </div>
                <!-- /. ROW  -->
            </div>
            <!-- /. PAGE INNER  -->
        </div>
        <!-- /. PAGE WRAPPER  -->
    </div>
    <!-- /. WRAPPER  -->
</body>
</html>
